#ifndef USER_H
#define USER_H

#include <Qt>
#include <QString>
#include <QList>
#include <QDate>
#include "adresse.h"
#include "contact.h"
#include "typeprestation.h"
#include "objtosql.h"


class User : public objToSQL
{
public:

    static const QString NomChampUser;

    User();
    User(QString nom);
    User(QSqlQuery query);

    static const QString NomColonneListeContact;

    void setNom(QString nom);
    void setAdresse(Adresse adresse);
    void setContact(Contact contact);

    QString getNom()const;
    Adresse getAdresse()const;
    Contact getContact()const;
    void BindValues(QSqlQuery &query, QStringList champs);

    bool operator ==(User const& user);

    static QStringList ListeChampSQL();
    static QStringList ListeTypeDataSQL();

    QStringList SQLWhere()const;
    QString SQLSet()const;
    QString SetQuery()const;
    QStringList SetBindValues()const;

private:
    QString m_nom;
    Adresse m_adresse;
    Contact m_contact;


};

#endif // USER_H
